package cn.tedu.uep.application.controller;

import cn.tedu.uep.application.pojo.dto.ApplicationSaveParam;
import cn.tedu.uep.application.service.ApplicationService;
import cn.tedu.uep.base.response.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/v1/application")
public class ApplicationController {
    @Autowired
    private ApplicationService applicationService;

    /*添加申请单*/
   @PostMapping ("save")
    public JsonResult saveApplication(ApplicationSaveParam applicationSaveParam) {
       log.info("开始处理添加申请单的请求，参数：{}", applicationSaveParam);
       applicationService.saveApplication(applicationSaveParam);
       return JsonResult.ok();
    }
}
